package com.lagou.task14;

import java.util.Stack;

public class StackTest {
    public static void main(String[] args) {
        Stack sk1 = new Stack();
        sk1.push(11);
        sk1.push(22);
        sk1.push(33);
        sk1.push(44);
        sk1.push(55);
        System.out.println(sk1);
        System.out.println(sk1.peek());
        System.out.println("--------------------");
        int size = sk1.size();
        for (int i = 0; i < size; i++){
            System.out.println("size = " + size);
            System.out.println("元素："+sk1.peek());
            sk1.pop();
        }

    }
}
